package edu.nju.desserthouse.action.business;

import java.io.Serializable;
import java.util.ArrayList;

import nju.edu.desserthouse.model.Goods;

public class BestSellerInfoBean implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	private ArrayList<Goods> goods = new ArrayList<Goods>();
	private ArrayList<Integer> sale = new ArrayList<Integer>();
	
	
	public int getSale(int i){
		return sale.get(i);
	}
	
	public void setSale(int i, int value){
		sale.set(i, value);
	}

	public ArrayList<Goods> getGoods() {
		return goods;
	}

	public void setGoods(ArrayList<Goods> goods) {
		this.goods = goods;
	}
	
	public void initList(){
		for(int i = 0; i < goods.size(); i++){
			sale.add(i,0);
		}
	}
	
	public void addToSale(int index){
		int value = sale.get(index);
		value++;
		sale.set(index, value);
	}
}
